#include<vector>
#include"BinarySearchTree.h"

int main()
{
	BSTree<int> tree;

	vector<int> arr = { 8, 3, 1, 10, 6, 4, 7, 14, 13 ,1};
	for (auto& e : arr)
	{
		tree.Insert(e);
	}
	tree.Inorder();
	tree.Insert(16);
	tree.Inorder();

	tree.Erase(16);
	tree.Inorder();

	int sum = 0;
	for (auto& e : arr)
	{
		if (e == 13)
		{
			sum++;
		}
		tree.Erase(e);
		tree.Inorder();
	}

	cout<<tree.Search(5);


}